//判断s和t是不是用相同的单词构成的
//hashtable
bool isAnagram(string s, string t) {
    int words[26] = {0};

    for (int i = 0; i < s.size(); i++) {
        words[s[i] - 'a']++;
    }
    for (int j = 0; j < t.size(); j++) {
        words[t[j] - 'a']--;
    }
    for (int i = 0; i < 26; i++) {
        if (words[i] != 0)
            return false;
    }
    return true;
}
